/*
 * @(#)SlotName.java
 * Date 2013-04-10
 * Version 1.0
 * Author Jim Horner
 * Copyright (c)2012
 */


package us.hornerscorners.lamppost.registry.constant;

/**
 *
 * @author jim
 */
public enum SlotName {

    AuthorInstitution("authorInstitution"),
    AuthorPerson("authorPerson"),
    AuthorRole("authorRole"),
    AuthorSpecialty("authorSpecialty"),
    AuthorTelecommunication("authorTelecommunication"),
    CodingScheme("codingScheme"),
    CreationTime("creationTime"),
    Hash("hash"),
    IntendedRecipient("intendedRecipient"),
    LanguageCode("languageCode"),
    LastUpdateTime("lastUpdateTime"),
    LegalAuthenticator("legalAuthenticator"),
    RepositoryUniqueId("repositoryUniqueId"),
    ServiceStartTime("serviceStartTime"),
    ServiceStopTime("serviceStopTime"),
    Size("size"),
    SourcePatientId("sourcePatientId"),
    SourcePatientInfo("sourcePatientInfo"),
    SubmissionTime("submissionTime"),
    Uri("URI")
    ;
    
    /** Field description */
    private final String code;

    /**
     * Constructs ...
     *
     *
     * @param code
     */
    private SlotName(String name) {
        this.code = name;
    }

    /**
     * Method description
     *
     *
     * @param code
     *
     * @return
     */
    public static SlotName toSlotName(String uuid) {

        SlotName result = null;

        for (SlotName myuuid : values()) {

            if (myuuid.code.equals(uuid)) {

                result = myuuid;

                break;
            }
        }

        return result;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public String getCode() {

        return this.code;
    }
}
